Optimal. Leaf size=141 \[ -\frac{B \sin (e+f x) (a \cos (e+f x))^{m+2} \, _2F_1\left (\frac{1}{2},\frac{m+2}{2};\frac{m+4}{2};\cos ^2(e+f x)\right )}{a^2 f (m+2) \sqrt{\sin ^2(e+f x)}}-\frac{C \sin (e+f x) (a \cos (e+f x))^{m+3} \, _2F_1\left (\frac{1}{2},\frac{m+3}{2};\frac{m+5}{2};\cos ^2(e+f x)\right )}{a^3 f (m+3) \sqrt{\sin ^2(e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.13511, antiderivative size = 141, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 30, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.1, Rules used = {3010, 2748, 2643} \[ -\frac{B \sin (e+f x) (a \cos (e+f x))^{m+2} \, _2F_1\left (\frac{1}{2},\frac{m+2}{2};\frac{m+4}{2};\cos ^2(e+f x)\right )}{a^2 f (m+2) \sqrt{\sin ^2(e+f x)}}-\frac{C \sin (e+f x) (a \cos (e+f x))^{m+3} \, _2F_1\left (\frac{1}{2},\frac{m+3}{2};\frac{m+5}{2};\cos ^2(e+f x)\right )}{a^3 f (m+3) \sqrt{\sin ^2(e+f x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3010
Rule 2748
Rule 2643
Rubi steps
\begin{align*} \int (a \cos (e+f x))^m \left (B \cos (e+f x)+C \cos ^2(e+f x)\right ) \, dx &=\frac{\int (a \cos (e+f x))^{1+m} (B+C \cos (e+f x)) \, dx}{a}\\ &=\frac{B \int (a \cos (e+f x))^{1+m} \, dx}{a}+\frac{C \int (a \cos (e+f x))^{2+m} \, dx}{a^2}\\ &=-\frac{B (a \cos (e+f x))^{2+m} \, _2F_1\left (\frac{1}{2},\frac{2+m}{2};\frac{4+m}{2};\cos ^2(e+f x)\right ) \sin (e+f x)}{a^2 f (2+m) \sqrt{\sin ^2(e+f x)}}-\frac{C (a \cos (e+f x))^{3+m} \, _2F_1\left (\frac{1}{2},\frac{3+m}{2};\frac{5+m}{2};\cos ^2(e+f x)\right ) \sin (e+f x)}{a^3 f (3+m) \sqrt{\sin ^2(e+f x)}}\\ \end{align*}
Mathematica [A] time = 0.252161, size = 118, normalized size = 0.84 \[ -\frac{\sqrt{\sin ^2(e+f x)} \cos (e+f x) \cot (e+f x) (a \cos (e+f x))^m \left (B (m+3) \, _2F_1\left (\frac{1}{2},\frac{m+2}{2};\frac{m+4}{2};\cos ^2(e+f x)\right )+C (m+2) \cos (e+f x) \, _2F_1\left (\frac{1}{2},\frac{m+3}{2};\frac{m+5}{2};\cos ^2(e+f x)\right )\right )}{f (m+2) (m+3)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 1.489, size = 0, normalized size = 0. \begin{align*} \int \left ( a\cos \left ( fx+e \right ) \right ) ^{m} \left ( B\cos \left ( fx+e \right ) +C \left ( \cos \left ( fx+e \right ) \right ) ^{2} \right ) \, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (C \cos \left (f x + e\right )^{2} + B \cos \left (f x + e\right )\right )} \left (a \cos \left (f x + e\right )\right )^{m}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left ({\left (C \cos \left (f x + e\right )^{2} + B \cos \left (f x + e\right )\right )} \left (a \cos \left (f x + e\right )\right )^{m}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (C \cos \left (f x + e\right )^{2} + B \cos \left (f x + e\right )\right )} \left (a \cos \left (f x + e\right )\right )^{m}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]